package cn.readjava.service.impl;

import cn.readjava.bean.VideoCategory;
import cn.readjava.dao.VideoCategoryDao;
import cn.readjava.service.VideoCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class VideoCategoryServiceImpl implements VideoCategoryService {

    @Resource
    private VideoCategoryDao videoCategoryDao;

    @Override
    public void deleteById(Long id) {
        videoCategoryDao.deleteById(id);
    }

    @Override
    public VideoCategory save(VideoCategory vc) {
        return videoCategoryDao.save(vc);
    }

    @Override
    public VideoCategory getOne(Long id) {
        return videoCategoryDao.getOne(id);
    }

    @Override
    public List<VideoCategory> findAll() {
        return videoCategoryDao.findAll();
    }
}
